package test

import config.MyFile
import org.apache.commons.io.FileUtils
import scala.jdk.CollectionConverters._

object getGos extends MyFile{

  def main(args: Array[String]): Unit = {

   val path =  "D:\\上海农科院大麦基因组\\annotation/"

   val go1 = s"$path/GOSDes.txt".readLines.map(_.split("\t")).map(x=> x.head -> x.last).toMap
   val go2 = s"$path/Hordeum_vulgare_GoldenPromise_GOSDES.txt".readLines.map(_.split("\t")).map(x=> x.head -> x.last).toMap
   val go3 = s"$path/Hordeum_vulgare_TRITEX_GOSDES.txt".readLines.map(_.split("\t")).map(x=> x.head -> x.last).toMap

    val gos = go1 ++ go2 ++ go3

    FileUtils.writeLines(s"$path/god.txt".toFile,gos.map(x=>x._1 + "\t" + x._2).toBuffer.asJava)

  }
}
